package com.zhuqieli.database_learn.pojo;

import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

/**
 * @author dupr
 * @description 用户信息表实体类
 * @date 2023/8/30 19:33:39
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class UserTable implements Serializable {

    //id
    private Integer id;

    //电话
    @NotNull
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phoneNumber;

    //用户名
    @NotNull
    @NotBlank
    private String name;

    //密码
    @NotNull
    @NotBlank
    private String password;

    //创建时间
    private Date createdAt;

    //修改时间
    private Date updatedAt;

}
